﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Manager.master" AutoEventWireup="true" CodeFile="LetterDetail.aspx.cs" Inherits="User_LetterDetail" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <script type="text/javascript">
        var doPostbackWithConfirmation = function () {
            var postBackFn = this.postback.fn
            Ext.Msg.confirm('Confirm', 'Bạn có chắc muốn xóa tin nhắn này không?', function (btn) {
                if (btn == 'yes') { postBackFn(); }
            });
            return false;
        }
        var redirect = function () {
            var postback = this.postback.fn
            postback();
            return false;
        }
        var BackPage = function () {
            var postback = this.postback.fn
            postback();
            return false;
        };
      </script>
    <div style="margin:0 auto">
        <div class="content_area1">
            <h1>Chi tiết</h1>
            <div style="margin-left:20px;">
                <table width="97%">
                    <tr>
                        <td>Tiêu đề: </td>
                        <td><asp:Label ID="lblSubject" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td>Người gửi: </td>
                        <td><asp:Label ID="lblFrom" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td>Ngày nhận: </td>
                        <td><asp:Label ID="lblReceiveDate" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td>Nội dung</td>
                        <td><asp:Literal ID="ltrContent" runat="server"></asp:Literal></td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <ext:FormPanel runat="server" Width="635px">
                                <Buttons>
                                    <ext:Button ID="btnReply" runat="server" Text="Trả lời" OnClick="GotoReplyPage" AutoPostBack="true" FormBind="true">
                                        <Listeners>
                                            <Click Fn="redirect" Handler="App.direct.GotoReplyPage();" />
                                        </Listeners>
                                    </ext:Button>
                                    <ext:Button ID="btnDelete" runat="server" Text="Xóa" OnClick="btnDelete_Click" FormBind="true" AutoPostBack="true">
                                        <Listeners>
                                            <Click Fn="doPostbackWithConfirmation" Handler="App.direct.ShowAlertDeleteMail({success: function(responseText){Ext.Msg.alert('Thông báo',responseText)}});" />
                                        </Listeners>
                                    </ext:Button>
                                    <ext:Button ID="btnBack" runat="server" Text="Quay lại" OnClick="btnBack_Click" AutoPostBack="true">
                                        <Listeners>
                                            <Click Fn="BackPage" />
                                        </Listeners>
                                    </ext:Button>
                                </Buttons>
                            </ext:FormPanel>
                        </td>
                    </tr>
                </table>
            </div>
            <br class="clear" />
            <img src="<%= ResolveUrl("~/images/bottom.jpg")%>" align="absbottom" alt="" />
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
</asp:Content>

